#ifndef _Relocalisation_H
#define _Relocalisation_H

#include "keyframe.h"
#include <vector>
#include "getMatch.h"
#include "complement.h"
#include <opencv2/opencv.hpp>
#include "headers.h"
#include "Solve3D.h"
#include "Cost.hpp"
#include "tracking.h"
#include "global.h"


namespace markerAR
{
    

//#define isDebug


class Relocalisation
{
public:
    Relocalisation();
    ~Relocalisation();
    bool tryRelocalisation(const Mat&img,double timeStamp);
    bool tryRelocalisationByBoW(const Mat&img,double timeStamp);
    bool getbg() {return bg;}
    //	void addKeyframe(const Keyframe &kf){ allKeyframes.push_back(kf); };
private:
    bool bg;
    //	vector<Keyframe> allKeyframes;
//    int64 computeSSD(const Mat&a, const Mat&b, const float scale = 0.25);
    double d_ScaleOfSmallBlurImage=0.1;
    int64 computeSSD(const Mat&a, const Mat&lowb);
    //    Ptr<Guo::ORB> orb;
    //	Ptr<DescriptorMatcher> binaryMatcher;
};






}

#endif